System and method for intelligent delivery of segmented media streams

ABSTRACT

A system and method for reducing the delay and optimizing the process of delivering real-time media segments on communication networks. This is accomplished by allowing media segment requests to be queued ahead of the time that the segment exists. The system includes the ability to request segments by selected criteria or by explicit reference naming techniques. This reduces delay and optimizes bandwidth usage when applied within otherwise high latency communication networks, including Content Delivery Networks.

TECHNICAL FIELD

The subject of the invention is improving the broadcasting, distribution, and delivery of live audio/video over the internet.

BACKGROUND

For nearly two decades, internet users have been able to enjoy low-delay content delivery over the RTMP protocol in the Adobe Flash Player and more recently via experimental HLS over WebSockets. Both of these methods of content delivery operate by opening a single bi-directional communication channel between the viewer and a server. The media is then relayed, in real-time, to the viewer after being received by the server. This is problematic for a number of reasons: (1) scalability is created through branching, (2) more computing power is needed, (3) the media must be packaged for every viewer individually, (4) the incompatibility with content delivery networks, (5) the requirement for complex load balancing, and (6) inefficient media packaging. Branching provides a method to scale while keeping the delay as low as possible; however, it suffers from the fundamental problem that any upstream “hiccups” will propagate downstream. Any error which forces data to be dropped will cause the stream to become unrecoverable and cause the stream to halt for every viewer until the problem recovers and a keyframe becomes available.

In an effort to simplify distribution and fault-tolerance in live streaming, segmented media streaming over HTTP has become the de-facto standard for media delivery in recent years. Segmented media streaming involves segmenting the stream into documents containing multiple audio/video frames instead of immediately passing each audio/video frame to the viewer.

Segmented media streaming provides greater efficiency by allowing the viewer only to download a segment of the media which he/she wishes to view and by allowing the switching between different quality versions. The two most widely adopted formats for segmented media streaming are: HTTP Live Streaming (HLS) and Dynamic Adaptive Streaming over HTTP (DASH). Both formats employ manifest (e.g. table of contents) documents to describe the stream information and the list of segments and are generally well optimized for static delivery of on-demand content. They provide a number of options for delivering and storing multiple audio and video tracks in an optimized fashion. This allows content providers to optimize their cost of storage and network bandwidth.

While many of these features are important innovations for on-demand content, they pose varying problems with delay-sensitive streaming due to: (1) lack of synchronization with content source, (2) the need to continuously update the manifest document, (3) the need to request resources individually, and (4) the need to periodically open new communication channels when requesting resources.

SUMMARY

The subject invention enhances the Request & Response method used for delivering Segmented Media Streams.

Current implementations of HLS and DASH provide no mechanism to synchronize the manifest updates with the viewer. For this reason, a variable delay of between 0 seconds and the typical segment duration is always present. If a typical segment duration is 2 seconds, it is possible for a viewer to have an additional delay of up to 2 seconds beyond the segments currently listed in the manifest document. This is because the broadcast receiver is “buffering” the next segment. Only when the next segment is completed, can it be added to the manifest for viewers to download. This, itself, is a large problem for predicting delay time.

Delivering low delay content to a large audience requires the need to balance requests across a large pool of servers. For this reason, the viewer must periodically open new connections to new remote devices to maintain the balance and ensure a high level quality of service. Opening and authenticating new connections can often take upwards of 240 ms or more if the round-trip-time between the two devices is 80 ms. This additional delay is totally unacceptable when using segment durations of 1000 ms or less, as it consumes such a large portion of the “acquisition window” (the amount of time allowed to acquire the next document before the viewer playback is paused) where the likelihood of an interruption in the playback drastically increases. For this reason, shifting the “connect and request” phase to a time where the “requested document” does not yet exist and not receiving a response until the “requested document” does exist, will “prime” this phase and shift the potential 240 ms outside of the “acquisition window”.

BRIEF DESCRIPTIONS OF THE DRAWINGS

FIG. 1 illustrates the basic components of a server providing the ability to receive streaming media and have viewers play the media using segment-based streaming protocols. (such as HLS or DASH)

FIG. 2 illustrates the basic components of a server which can receive broadcasts and convert to a segmented media stream. (such as HLS or DASH)

FIG. 3 illustrates the basic components of a server which can deliver media segments and manifest information to viewers, upon request.

FIG. 4 illustrates the delivery intelligence of the “Segment Request Handler” as shown in 304. Unlike traditional models, the broadcast components and their individual states, from FIG. 2, are taken into consideration to make intelligent decisions on how to handle requests.

DETAILED DESCRIPTIONS OF THE DRAWINGS

As described in the prior art, a Streaming Media Server 101 contains a minimum of the ability to receive incoming streams and allow for Viewers 102 to play the streams in one or more formats. FIG. 1 focuses on the minimum configuration to allow the processing of an incoming stream into a format suitable for segmented media streaming.

In order for the Streaming Media Server 101 to process streams, there must be a Broadcaster 103 and a Broadcast Component 105. This Broadcaster 103 will transmit a stream in a compatible format to the Streaming Media Server 101. The stream is handled and processed by the Broadcast Component 105. The Broadcast Component 105 is responsible for receiving and processing data in such a way that the Audio and Video data can be accessed by other components of the Streaming Media Server 101. The Broadcast Component 105 may also record the incoming stream to the File System 106 or some other suitable storage medium.

Since this invention involves the delivery of Segmented Media Streams, the Viewer 102 is required to Request each Media Segment as described in the arrows pointing from 102 to 104 in FIG. 1. The Viewer 102 must request a Media Segment by name. (e.g. segment_0075.ts) This request is handled by the Viewer Component 104. The Viewer Component 104 is responsible for processing the Viewer's 102 request and responding to it.

The basic implementation of a Broadcast Component 105 with support for generating Segmented Media Streams is shown in FIG. 2. The role of the Broadcast Component 105 is to receive, process the incoming Broadcast and convert it to a Segmented Media Stream. The Data Receiver 201 and Packet Reader 202 work together to receive and process the raw data produced by the Broadcaster 103 and convert it into individual packets. These packets usually contain a single audio/video frame or other data. For example, a video stream with 30 frames per second should contain 30 video packets per second. Audio is slightly more complicated but the same principal applies.

As part of the segmentation function, each packet is processed. Its timecode, frame type, and other information is read by the Segmentation Controller 203 and decisions are made as to when the segmentation should occur. This requires some stateful information to be stored in the Segmentation Controller 203. The type of information stored in the Segmentation Controller 203 includes but is not limited to: (1) when the last segment occurred, (2) the number of segments created, (3) how many packets have been processed since the last segment, (4) the last packet's timecode, and (5) various other information used to control the segmentation process. The Segmentation Controller 203 forwards the Packets to the Segmentation Recorder 204 and a number of other Additional Packet Receivers 205. When it is determined that a segmentation should occur, the Segmentation Recorder 204 is notified and the queued packets are converted into a Segment and written to the File System 106. Typically, the Segment is written to the File System 106 using a Filename with an incrementing integer. (e.g. segment_4.ts, segment_5.ts, segment_6.ts)

FIG. 3 describes the Request & Response pattern used by the Viewer to obtain the Segmented Media Stream and shows the Breakout of the Viewer Component 104. As described in FIG. 3, the Viewer 102 requests the Manifest or an individual Segment File and the Server 101 responds with the requested data or an error message. The Viewer Component 104 contains a Data Receiver 301 to receive the raw data from the Viewer 102 and a Request Reader 302 to convert the raw data into Requests.

The Request Reader 302 must read the type of request and understand how it should be handled. If the Request Reader 302 understands the request type to be a Segment File then it will be forwarded to the Segment Request Handler 304. Same goes for the Manifest and the Manifest Request Handler 303. How the Request Reader 302 determines the type of request is described in the prior art.

The invention is described in FIG. 4 and shows a Breakout of the Segment Request Handler 304. By design, the Request & Response pattern is performed as quickly as possible. Due to this, it can be used to measure the relative performance of the Server 101 by issuing requests and measuring how long they take to complete.

As described in HLS and DASH, there is no specified method of synchronizing the action of the Segmentation Controller 203 with the Viewer 102. For this reason, the effective delay of the Viewer's playback is variable based on the size of the unwritten segment data. FIG. 4 describes the features and functions of this invention that allow for the Viewer to synchronize with the Server and to issue error resistant Segment Requests.

When processing the Request in the Segment Request Handler 304 there are a series of conditions which are executed on Request, in sequence. The only condition to exist in the prior art is 404. In the prior art, the “yes” output of condition 404 would connect to 405 and the “no” output of condition 404 would connect directly to 408.

Upon the Request Reader 302 sending the Request to the Request Receiver 401, the request is read to determine if the requested segment is the special “synchronized” segment in 402. The special “synchronized” segment is identified by a filename which differs from the traditional format of “name_number.ext”. For this example, “x-sync” can be used. The “synchronized” segment is a segment which begins with a video keyframe. This is a unique feature of this invention because it allows the Viewer to request a segment by a feature or indicia instead of its literal name. The Viewer has no control over which exact segment is returned; however, it will contain a video keyframe, by contract.

If the “synchronized” segment is determined have been requested in 402 then the flow will progress to 403 where the Segmentation Controller 203 and Segmentation Recorder 204 must be consulted to determine the appropriate time in which the next “synchronized” segment will be made available. The determined appropriate time is used to prevent the request from hanging at 403 forever. If a “synchronized” segment does not become available within the appropriate time then the error is triggered in 408 alerting the Viewer that an error has occurred.

If the “synchronized” segment is not determined to have been requested in 402 then the flow will progress to 404 where a simple true/false condition must determine if the segment does exist. At a minimum, the File System 106 must be consulted. Optionally, the Segmentation Recorder 204 may also be consulted. If the segment does exist then it shall be transferred to the Viewer starting at 405; otherwise the flow shall continue to conditional operation 406.

Conditional operation 406 only states “WII the Segment exist in the Future”. The determination if a specific segment will exist in the future comes down to a number of factors. As previously mentioned, segment names follow a naming pattern with a incrementing numerical suffix. (e.g. segment_1, segment_2, segment_3) This naming pattern is predictable and is therefore useful in estimating certain values. Conditional operation 406 may utilize the state and information from the Segmentation Controller 203 and Segmentation Recorder 204 to compare the currently available segments, by number, and to determine the estimated time at which the requested segment MAY become available.

For example, if the Viewer requests segment #2005; the current segment number can be obtained by either 203 or 204 to determine if #2005 is greater than the current segment number. If #2005 is more than 1 greater than the current segment number the segment duration history can be analyzed to estimate the time that #2005 will begin. If the current segment number is #2001 and the segment duration history median value is approximately 1 second per segment then it can be assumed that #2005 should exist 4 seconds into the future. In order to protect the Server from unreasonable requests, it is important to limit the window in which future segments can be requested to around 5 times the median segment duration. The window, in which Viewers may request segments that may exist, is configurable. In the event that the requested segment number is less than the current segment number and had already failed the prior condition 404 then it is assumed that it was deleted as part of a rolling window of segment availability and an error will be returned in 408.

If the requested segment is determined to exist in the near future then the flow will progress to 407 where it will wait until 203/204 have notified 407 that the segment now exists or the timeout has occurred. The timeout is determined by the estimated time at which the segment should become available as described in the previous paragraph.

While the direct time saving that may be expected from the operation of FIG. 4 may, in certain circumstances, be only a fraction of a second, the secondary or indirect time saving of this small time saving could well be an order of magnitude greater due to the consequential reduction in the probability of delays inherent in transmission of the data and the need for the Viewer to adjust delay parameters to maintain uninterrupted playback. 

The invention claimed is:
 1. In a media streaming network including a broadcast component for producing data segments from a live broadcast, a server for receiving requests for specifically identified data segments from a viewer and responding to said viewer with requested data, said viewer being capable of sending data segment requests to and processing responses from said server to play said live broadcast, a method comprising the steps: a. causing said broadcast component to create a first data segment having a first identifier, b. causing said viewer to possess a second identifier relating to a second data segment, c. causing said viewer to utilize said second identifier to request said second data segment from said server, d. improving network functionality by the further steps of:
 1. causing said viewer to request said second data segment from said server prior to the moment that said second data segment initially comes into existence within said server,
 2. causing said server to utilize said second identifier in conjunction with said first identifier to determine whether said second data segment will come into existence within said server subsequent to the making of said determination,
 3. upon determining that said second data segment will come into existence within said server, restricting a time that said server is caused to wait for data related to said second data segment to become available to a limited period of time,
 4. transferring at least some of the second data segment to said viewer.
 2. In a media streaming network in accordance with claim 1, the further steps of: a) facilitating the ability of said server to transfer an error signal to said viewer upon the detection of an error justifiable event, and b) in the absence of the detection of an error justifiable event, preventing the transfer of said error signal to the said viewer until said limited period of time has expired.
 3. In a live media streaming network including a broadcast component for producing data segments from a live broadcast, a server and a plurality of viewers, a method of improving the network functionality by increasing the speed of transferring a live broadcast to a plurality of viewers comprising the steps of: a. causing said broadcast component to divide said live broadcast into distinct data segments, b. providing identifiers for said distinct data segments, c. causing at least one of said plurality of viewers to make specifically identified data segment requests from said server, d. causing said server to respond to said specifically identified data segment requests, including the further steps of: i. causing said server to assume an identifier of a yet-to-exist data segment without first receiving, from any source, confirmation that data relating to said assumed identifier will actually exist within said server in the future, ii. causing said server to wait until data related to said assumed identifier actually exists or until the lapse of a limited period of time, iii. transferring segment data associated with said assumed identifier to said one of said plurality of viewers if said segment data comes into existence within said server during said limited period of time, iv. in the event that segment data associated with said assumed identifier does not become available prior to the lapse of said limited period of time, then transmitting an error signal to said one of said plurality of viewers.
 4. In a live media streaming network in accordance with claim 3 including the steps of: a. determining whether or not a data segment related to said assumed identifier will exist at a moment in time that is subsequent to the making of said determination, and b. causing an error signal to be transmitted to said one of said plurality of viewers upon a determination that said data segment related to said assumed identifier will not exist subsequent to the making of said determination.
 5. In a media streaming network including a broadcast component for producing a live streaming broadcast, a server having a viewer component for receiving requests for specifically identified data segments from a viewer and responding to said viewer with requested data, said viewer being capable of sending data requests to and processing responses from said viewer component to play said live streaming broadcast, a method comprising the steps of: a. providing identifiers for said data segments, b. causing said viewer to submit a request for a specifically identified data segment to said viewer component and to receive segment data from said viewer component in response to said request, c. improving network functionality by the further steps of: i. determining whether said requested specifically identified data segment exists in said viewer component when requested, ii. in the event that said requested specifically identified data segment has been determined to not exist in said viewer component when requested, then further determining whether said requested specifically identified data segment will exist at a time that is subsequent to the moment of making said determination, iii. upon determining that said requested specifically identified data segment will exist in the future, waiting for a limited window of time for data of said requested specifically identified data segment to come into existence, iv. in the event that data of said requested specifically identified data segment becomes available within said limited window of time, transferring said data to said viewer as it becomes available, v. upon determining that said requested individual specifically identified data segment will not exist at a time that is subsequent to the moment of making said determination or upon determining that said requested specifically identified data segment will not or has not come to exist within said limited window of time, then sending an error signal to said viewer. 